#ifndef JDATA_H_INC
#define JDATA_H_INC

#include "cjson.h"
#include "..\dvb\dvb.h"
#include "..\dvb\dvb_array.h"
#include "cexp.h"

#define MT_NULL				0x0000
#define MT_BOOL				0x0001
#define MT_INT				0x0002
#define MT_FLOAT			0x0003
#define MT_STRING			0x0010
#define MT_DATE				0x0011
#define MT_TIME				0x0012
#define MT_DATETIME			0x0013
#define MT_EMPTY_ARRAY		0x0100
#define MT_INT_ARRAY		0x0102
#define MT_FLOAT_ARRAY		0x0103
#define MT_STRING_ARRAY		0x0110
#define MT_JPACK			0x1000
#define MT_JPACKLIST		0x2000

WORD Cjson2Type(cJSON* jitem);
BOOL CjsonGetBool(cJSON* jitem, BOOL* mBool, IVarDict* varDict);
BOOL CjsonGetInt(cJSON* jitem, long* mInt, IVarDict* varDict);
BOOL CjsonGetFloat(cJSON* jitem, double* mFloat, IVarDict* varDict);
BOOL CjsonGetDvb(cJSON* jitem, DVB* mDv, IVarDict* varDict);

#endif
